home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 11
/
CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso
/
s
/
groupcopytopages.pprx
< prev
next >
Wrap
Text File
|
1993-02-15
|
2KB
|
89 lines
/*
@BGroupCopyToPages @P@ICopyright Gold Disk Inc. Jan, 1993
Copy the current group to a specified range of pages.
*/
parse arg startpage, endpage
address command
call SafeEndEdit.rexx()
call ppm_AutoUpdate(0)
pageoptions = "ODDEVENALL "
last = ppm_DocLastPage()
first = ppm_DocFirstPage()
box = ppm_GroupFirstBox()
if box = 0 then exit_msg("Select a group of boxes first")
if startpage = '' then
do
form = "Start Page:"first'0a'x"End Page:"last'0a'x"ODD/EVEN/ALL:"all
form = upper(ppm_GetForm("Enter options", 8, form))
if form = '' then exit_msg()
parse var form startpage '0a'x endpage '0a'x pageopts
if endpage = '' then endpage = startpage
if pageopts = '' then pageopts = 'ALL'
end
if ~(datatype(startpage,n) & datatype(endpage,n)) then
exit_msg("Invalid input")
if verify(pageopts, pageoptions) ~= 0 then exit_msg("Invalid Input")
opos = pos(pageopts, pageoptions)
if opos = 4 then
do
increment = 2
if (startpage // 2) then startpage = startpage + 1
end
else if opos = 1 then
do
increment = 2
if ~(startpage // 2) then startpage = startpage + 1
end
else increment = 1
boxnum = 0
do while box ~= 0
boxnum = boxnum + 1
boxes.boxnum = box
box = ppm_GroupNextBox(box)
end
do page = startpage to endpage by increment
do i = 1 to boxnum
newbox = ppm_CloneBox(boxes.i, 0, 0)
call ppm_BoxChangePage(newbox, page)
if ppm_TextOverFlow(boxes.i) then
do
text = ppm_GetBoxText(boxes.i, 1)
call ppm_DeleteContents(newbox)
call ppm_TextIntoBox(newbox, text)
end
end
end
exit_msg("Done")
exit_msg: procedure
do
parse arg message
if message ~= '' then
call ppm_Inform(1,message,)
call ppm_AutoUpdate(1)
exit
end